< previous page page_730 next page >

Page 730
If you use a long integer as your primary key, you always have the option of using the IDENTITY, AutoNumber, or Sequence numbers that will automatically generate an ID for you. This way, you dont have to remember to increment a number each time. However, some front-end applications dont allow you to always retrieve the value that was just generated, so you do need to weigh the usage based on your front-end application.
Common Columns
Each table in your system should contain columns that will allow you to track who made the last update and at what time and date that update was performed. The following field names are put into each of the tables in a database:
sLastUpdate_id
dtLastUpdate_dt
iConcurrency_id
The last field can be used if you want to track multiuser access to this row yourself. This might be used in place of a timestamp field. If the database system you have does not support a timestamp feature, you could build your own incrementing field. Of course, this means you need to fill in this field and update it every time the table is modified.
System Tables
Often, youll have tables that are used in multiple applications. Preface these table names with either tbl or sys. Here are some examples:
tblTableIDs
tblSystemVars
tblStates
sysValidations
sysFlags

 
< previous page page_730 next page >

If you like this book, buy it!